{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script><script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window._Plotly) {require(['plotly'],function(plotly) {window._Plotly=plotly;});}</script>"
      ],
      "text/vnd.plotly.v1+html": [
       "<script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script><script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window._Plotly) {require(['plotly'],function(plotly) {window._Plotly=plotly;});}</script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import plotly\n",
    "import plotly.graph_objs as go\n",
    "plotly.offline.init_notebook_mode(connected=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Basic Radar Chart"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "linkText": "Export to plot.ly",
        "plotlyServerURL": "https://plot.ly",
        "showLink": true
       },
       "data": [
        {
         "fill": "toself",
         "name": "Group A",
         "r": [
          39,
          28,
          8,
          7,
          28,
          39
         ],
         "theta": [
          "A",
          "B",
          "C",
          "D",
          "E",
          "A"
         ],
         "type": "scatterpolar",
         "uid": "c020ecab-86d1-431d-b944-21e3ac8fd0a3"
        },
        {
         "fill": "toself",
         "name": "Group B",
         "r": [
          1.5,
          10,
          39,
          31,
          15,
          1.5
         ],
         "theta": [
          "A",
          "B",
          "C",
          "D",
          "E",
          "A"
         ],
         "type": "scatterpolar",
         "uid": "7a262f24-0679-474e-b6d1-21ef9c9130ac"
        }
       ],
       "layout": {
        "polar": {
         "radialaxis": {
          "range": [
           0,
           50
          ],
          "visible": true
         }
        },
        "showlegend": false
       }
      },
      "text/html": [
       "<div id=\"02c3c29e-547c-4dd3-882a-abf5981cc950\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"02c3c29e-547c-4dd3-882a-abf5981cc950\", [{\"fill\": \"toself\", \"name\": \"Group A\", \"r\": [39, 28, 8, 7, 28, 39], \"theta\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"A\"], \"type\": \"scatterpolar\", \"uid\": \"c020ecab-86d1-431d-b944-21e3ac8fd0a3\"}, {\"fill\": \"toself\", \"name\": \"Group B\", \"r\": [1.5, 10, 39, 31, 15, 1.5], \"theta\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"A\"], \"type\": \"scatterpolar\", \"uid\": \"7a262f24-0679-474e-b6d1-21ef9c9130ac\"}], {\"polar\": {\"radialaxis\": {\"range\": [0, 50], \"visible\": true}}, \"showlegend\": false}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"})});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){window._Plotly.Plots.resize(document.getElementById(\"02c3c29e-547c-4dd3-882a-abf5981cc950\"));});</script>"
      ],
      "text/vnd.plotly.v1+html": [
       "<div id=\"02c3c29e-547c-4dd3-882a-abf5981cc950\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"02c3c29e-547c-4dd3-882a-abf5981cc950\", [{\"fill\": \"toself\", \"name\": \"Group A\", \"r\": [39, 28, 8, 7, 28, 39], \"theta\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"A\"], \"type\": \"scatterpolar\", \"uid\": \"c020ecab-86d1-431d-b944-21e3ac8fd0a3\"}, {\"fill\": \"toself\", \"name\": \"Group B\", \"r\": [1.5, 10, 39, 31, 15, 1.5], \"theta\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"A\"], \"type\": \"scatterpolar\", \"uid\": \"7a262f24-0679-474e-b6d1-21ef9c9130ac\"}], {\"polar\": {\"radialaxis\": {\"range\": [0, 50], \"visible\": true}}, \"showlegend\": false}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"})});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){window._Plotly.Plots.resize(document.getElementById(\"02c3c29e-547c-4dd3-882a-abf5981cc950\"));});</script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = [\n",
    "    go.Scatterpolar(\n",
    "        r = [39, 28, 8, 7, 28, 39],\n",
    "        theta = ['A','B','C', 'D', 'E', 'A'],\n",
    "        fill = 'toself',\n",
    "        name = 'Group A'\n",
    "    ),\n",
    "    go.Scatterpolar(\n",
    "        r = [1.5, 10, 39, 31, 15, 1.5],\n",
    "        theta = ['A','B','C', 'D', 'E', 'A'],\n",
    "        fill = 'toself',\n",
    "        name = 'Group B'\n",
    "    )\n",
    "]\n",
    "\n",
    "layout = go.Layout(\n",
    "    polar = dict(\n",
    "        radialaxis = dict(\n",
    "            visible = True,\n",
    "            range = [0, 50]\n",
    "        )\n",
    "      ),\n",
    "    showlegend = False\n",
    ")\n",
    "fig = go.Figure(data=data, layout=layout)\n",
    "plotly.offline.iplot(fig, filename = \"radar\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
